From 36113edac08b1dde559a4a39a9a75aabce95ade4 Mon Sep 17 00:00:00 2001
From: Fuwn <contact@fuwn.me>
Date: Mon, 22 Jan 2024 07:48:47 -0800
Subject: fix(badge): proxy AWC

---
 src/routes/user/[user]/badges/+page.svelte | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'src/routes/user/[user]/badges/+page.svelte')

diff --git a/src/routes/user/[user]/badges/+page.svelte b/src/routes/user/[user]/badges/+page.svelte
index 96950bbb..0e826c29 100644
--- a/src/routes/user/[user]/badges/+page.svelte
+++ b/src/routes/user/[user]/badges/+page.svelte
@@ -10,6 +10,7 @@
 	import Loading from '$lib/Utility/Loading.svelte';
 	import root from '$lib/Utility/root.js';
 	import tooltip from '$lib/Tooltip/tooltip.js';
+	import proxy from '$lib/Utility/proxy.js';
 	// import { io } from 'socket.io-client';
 
 	export let data;
@@ -54,7 +55,7 @@
 		}
 
 		badgesPromise = fetch(root(`/api/badges?id=${badger.id}`));
-		awcPromise = fetch(`https://awc.moe/challenger/${badger.name}`);
+		awcPromise = fetch(proxy(`https://awc.moe/challenger/${badger.name}`));
 
 		if (data.user) {
 			currentUserIdentity = userIdentity(data.user);
@@ -108,7 +109,7 @@
 								link: '#',
 								description: badge.alt,
 								image: badge.src.includes('placeholder')
-									? 'https://awc.moe/static/images/badge-placeholder.png'
+									? proxy('https://awc.moe/static/images/badge-placeholder.png')
 									: badge.src
 							};
 						})
@@ -125,7 +126,7 @@
 							link: badge.href,
 							description: image.alt,
 							image: image.src.includes('placeholder')
-								? 'https://awc.moe/static/images/badge-placeholder.png'
+								? proxy('https://awc.moe/static/images/badge-placeholder.png')
 								: image.src
 						};
 					})
-- 
cgit v1.2.3

